{if $builderMode}
	{if $theField.type eq "complex"}
		<div class="portlet htmlBlock" id="{$theField.sid}" btype="htmlBlock">
			<div class="b-actions"></div>
			<div class="portlet-header">[[FormFieldCaptions!{$theField.caption}]]</div>
			<div class="portlet-content">
				<fieldset>
					<h3>[[FormFieldCaptions!{$theField.caption}]]:</h3>
					<div class="inputField" id="edit_{$theField.sid}" style="display:none;">
						<div id="complexFields_info_{$theField.sid}" class="complexBlock_info"></div>
						<textarea name="{$theField.sid}" class="htmlBlock" cols="80" rows="20">{include file="bf_displaylisting_complex_field_defaults.tpl"}</textarea>
					</div>
					<div class="fieldValue" id="view_{$theField.sid}"></div>
					<div class="clr"></div>
					<div class="button" id="button_{$theField.sid}">Edit</div>
					<script type="text/javascript">{literal}
						$("document").ready(function(){
							builderFieldBlockView("{/literal}{$theField.sid}{literal}");
						});
					{/literal}
					</script>
					<div id="complexFields_info_{$theField.sid}_details" class="hidden">
						{literal}{<strong>******</strong>}{/literal}
						<h1>You can use the following values:</h1>
						{foreach from=$theField.fields item="complexChildField"}
							{$complexChildField.id} <br/>
						{/foreach}
					</div>
				</fieldset>
			</div>
		</div>
	{elseif $theField.b_field_sid eq "location" || $theField.id eq "location"}
		<div class="portlet htmlBlock" id="location" btype="htmlBlock">
			<div class="b-actions"></div>
			<div class="portlet-header">[[FormFieldCaptions!Location]]</div>
			<div class="portlet-content">
				<fieldset>
					<h3>[[FormFieldCaptions!Location]]:</h3>
					<div class="clr"></div>
					<div class="inputField" id="edit_location" style="display:none;">
						<div class="htmlBlock_info"></div>
						<textarea name="location" class="htmlBlock">{if !empty($theField.html)}{$theField.html}{else}{literal}{City}, {State}, {Country}{/literal}{/if}
						</textarea>
					</div>
					<div class="clr"></div>
					<div class="fieldValue" id="view_location"></div>
					<div class="clr"></div>
					<div class="button" id="button_location">Edit</div>
					<script type="text/javascript">{literal}
						$("document").ready(function(){
							builderFieldBlockView("location");
						});
					{/literal}
					</script>
				</fieldset>
			</div>
		</div>
	{elseif $listingTypeID eq "Resume" && $theField.b_field_sid eq "desiredSalary" || $theField.id eq "desiredSalary"}
		<div class="portlet htmlBlock" id="desiredSalary" btype="htmlBlock">
			<div class="b-actions"></div>
			<div class="portlet-header">[[FormFieldCaptions!Desired Salary and Salary Type]]</div>
			<div class="portlet-content">
				<fieldset>
					<h3>[[FormFieldCaptions!Desired Salary and Salary Type]]:</h3>
					<div class="clr"></div>
					<div class="inputField" id="edit_desiredSalary" style="display:none;">
						<div class="htmlBlock_info"></div>
						<textarea name="desiredSalary" class="htmlBlock">{if !empty($theField.html)}{$theField.html}{else}{literal}{DesiredSalary} {DesiredSalaryType}{/literal}{/if}
						</textarea>
					</div>
					<div class="clr"></div>
					<div class="fieldValue" id="view_desiredSalary"></div>
					<div class="clr"></div>
					<div class="button" id="button_desiredSalary">Edit</div>
					<script type="text/javascript">{literal}
						$("document").ready(function(){
							builderFieldBlockView("desiredSalary");
						});
					{/literal}
					</script>
				</fieldset>
			</div>
		</div>
	{elseif $listingTypeID eq "Job" && $theField.b_field_sid eq "customSalary" || $theField.id eq "customSalary"}
		<div class="portlet htmlBlock" id="customSalary" btype="htmlBlock">
			<div class="b-actions"></div>
			<div class="portlet-header">[[FormFieldCaptions!Salary and Salary Type]]</div>
			<div class="portlet-content">
				<fieldset>
					<h3>[[FormFieldCaptions!Salary and Salary Type]]:</h3>
					<div class="clr"></div>
					<div class="inputField" id="edit_customSalary" style="display:none;">
						<div class="htmlBlock_info"></div>
						<textarea name="customSalary" class="htmlBlock">{if !empty($theField.html)}{$theField.html}{else}{literal}{Salary} {SalaryType}{/literal}{/if}
						</textarea>
					</div>
					<div class="clr"></div>
					<div class="fieldValue" id="view_customSalary"></div>
					<div class="clr"></div>
					<div class="button" id="button_customSalary">Edit</div>
					<script type="text/javascript">{literal}
						$(document).ready(function(){
							builderFieldBlockView("customSalary");
						});
					{/literal}
					</script>
				</fieldset>
			</div>
		</div>
	{elseif $theField.html}
		<div class="portlet htmlBlock" id="{$theField.b_field_sid}" btype="htmlBlock">
			<div class="b-actions"></div>
			<div class="portlet-header">Html Block</div>
			<div class="portlet-content">
				<fieldset>
					<h3>Html Block:</h3>
					<div class="inputField" id="edit_{$theField.b_field_sid}" style="display:none;">
						<div class="htmlBlock_info"></div>
						<textarea name="{$theField.b_field_sid}" class="htmlBlock">{$theField.html}</textarea>
					</div>
					<div class="clr"></div>
					<div class="fieldValue" id="view_{$theField.b_field_sid}"></div>
					<div class="clr"></div>
					<div class="button" id="button_{$theField.b_field_sid}">Edit</div>
					<script type="text/javascript">{literal}
						$(document).ready(function(){
							builderFieldBlockView("{/literal}{$theField.b_field_sid}{literal}");
						});
					{/literal}
					</script>
				</fieldset>
			</div>
		</div>
	{elseif $theField.b_field_sid eq "id" || $theField.id eq "id"}
		<div class="portlet" id="id">
			<div class="b-actions"></div>
			<div class="portlet-header">[[FormFieldCaptions!{$listingTypeID} ID]]</div>
			<div class="portlet-content">
				<fieldset>
					<h3>[[FormFieldCaptions!{$listingTypeID} ID]]:</h3>
					<div class="inputField">&lt;{$theField.b_field_sid} value&gt;</div>
				</fieldset>
			</div>
		</div>
	{elseif $theField.b_field_sid eq "views" || $theField.id eq "views"}
		<div class="portlet" id="views">
			<div class="b-actions"></div>
			<div class="portlet-header">[[FormFieldCaptions!{$listingTypeID} Views]]</div>
			<div class="portlet-content">
				<fieldset>
					<h3>[[FormFieldCaptions!{$listingTypeID} Views]]:</h3>
					<div class="inputField">&lt;{$theField.b_field_sid} value&gt;</div>
				</fieldset>
			</div>
		</div>
	{elseif $theField.b_field_sid eq "posted" || $theField.id eq "posted"}
		<div class="portlet" id="posted">
			<div class="b-actions"></div>
			<div class="portlet-header">[[FormFieldCaptions!Posted]]</div>
			<div class="portlet-content">
				<fieldset>
					<h3>[[FormFieldCaptions!Posted]]:</h3>
					<div class="inputField">&lt;{$theField.b_field_sid} value&gt;</div>
				</fieldset>
			</div>
		</div>
	{else}
		<div class="portlet" id="{$theField.sid}">
			<div class="b-actions"></div>
			<div class="portlet-header">[[FormFieldCaptions!{$theField.caption}]]</div>
			<div class="portlet-content">
				<fieldset>
					<h3>[[FormFieldCaptions!{$theField.caption}]]:</h3>
					<div class="inputField">&lt;{$theField.id} value&gt;</div>
				</fieldset>
			</div>
		</div>
	{/if}
{else}	{* <<<<<<<<<<<<<<<<<<<<<<<<<<<<< FORMBUILDER FORM <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< *}
	{if $theField.type eq "complex"}
		{if $listing[$theField.id]}
			<div class="displayFieldBlock">
				<h3>[[FormFieldCaptions!{$theField.caption}]]:</h3>
				<div class="displayField">{display property=$theField.id customHtml=$theField.html}</div>
			</div>
		{/if}
	{elseif $theField.b_field_sid eq "location" || $theField.id eq "location"}
		{if $theField.html}
		<div class="displayFieldBlock">
			<h3>[[FormFieldCaptions!Location]]:</h3>
			<div class="displayField">
				{capture name=EvalReplacePattern}/{literal}{([\w\d]+)}{/literal}/i{/capture}
				{capture name=EvalReplaceReplacement}{literal}{display property="\1"}{/literal}{/capture}
				{assign var="newCustomHtml" value=$theField.html|regex_replace:$smarty.capture.EvalReplacePattern:$smarty.capture.EvalReplaceReplacement}
				{eval var=$newCustomHtml}
			</div>
		</div>
		{/if}
	{elseif $listingTypeID eq 'Resume' && ($theField.b_field_sid eq "desiredSalary" || $theField.id eq "desiredSalary") && (!empty($listing.DesiredSalaryType) || !empty($listing.DesiredSalary.value))}
		{if $theField.html}
		<div class="displayFieldBlock">
			<h3>[[FormFieldCaptions!Desired Salary]]:</h3>
			<div class="displayField">
				{capture name=EvalReplacePattern}/{literal}{([\w\d]+)}{/literal}/i{/capture}
				{capture name=EvalReplaceReplacement}{literal}{display property="\1"}{/literal}{/capture}
				{assign var="newCustomHtml" value=$theField.html|regex_replace:$smarty.capture.EvalReplacePattern:$smarty.capture.EvalReplaceReplacement}
				{eval var=$newCustomHtml}
			</div>
		</div>
		{/if}
	{elseif $listingTypeID eq 'Job' && ($theField.b_field_sid eq "customSalary" || $theField.id eq "customSalary") && (!empty($listing.SalaryType) || !empty($listing.Salary.value))}
		{if $theField.html}
		<div class="displayFieldBlock">
			<h3>[[FormFieldCaptions!Salary]]:</h3>
			<div class="displayField">
				{capture name=EvalReplacePattern}/{literal}{([\w\d]+)}{/literal}/i{/capture}
				{capture name=EvalReplaceReplacement}{literal}{display property="\1"}{/literal}{/capture}
				{assign var="newCustomHtml" value=$theField.html|regex_replace:$smarty.capture.EvalReplacePattern:$smarty.capture.EvalReplaceReplacement}
				{eval var=$newCustomHtml}
			</div>
		</div>
		{/if}
	{elseif $theField.html}
		{if $theField.html}
		<div class="displayFieldBlock">
			{capture name=EvalReplacePattern}/{literal}{([\w\d]+)}{/literal}/i{/capture}
			{capture name=EvalReplaceReplacement}{literal}{display property="\1"}{/literal}{/capture}
			{assign var="newCustomHtml" value=$theField.html|regex_replace:$smarty.capture.EvalReplacePattern:$smarty.capture.EvalReplaceReplacement}
			{eval var=$newCustomHtml}
		</div>
		{/if}
	{elseif $theField.b_field_sid eq "id" || $theField.id eq "id"}
		<div class="displayFieldBlock">
			<h3>[[FormFieldCaptions!{$listingTypeID} ID]]:</h3>
			<div class="displayField">[[$listing.id]]</div>
		</div>
	{elseif $theField.b_field_sid eq "views" || $theField.id eq "views"}
		<div class="displayFieldBlock">
			<h3>[[FormFieldCaptions!{$listingTypeID} Views]]:</h3>
			<div class="displayField">{$listing.views}</div>
		</div>
	{elseif $theField.b_field_sid eq "posted" || $theField.id eq "posted"}
		<div class="displayFieldBlock">
			<h3>[[FormFieldCaptions!Posted]]:</h3>
			<div class="displayField">[[$listing.activation_date]]</div>
		</div>
	{else}
		{if (!empty($listing[$theField.id]) && !is_array($listing[$theField.id])) || (is_array($listing[$theField.id]) && in_array($theField.type,array('video','file')) && !empty($listing[$theField.id].file_url)) || (!empty($listing[$theField.id]) && is_array($listing[$theField.id]) && !in_array($theField.type,array('video','file'))) }
			<div class="displayFieldBlock">
				<h3>[[FormFieldCaptions!{$theField.caption}]]:</h3>
				<div class="displayField">{display property=$theField.id}</div>
			</div>
		{/if}
	{/if}
{/if}